package com.example.pcl.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 预约表，记录学生与心理咨询师的预约信息
 * </p>
 *
 * @author xx
 * @since 2024-12-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("appointments")
@Schema(name = "Appointments对象", description = "预约表，记录学生与心理咨询师的预约信息")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Appointments implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "预约ID")
    @TableId(value = "appointment_id", type = IdType.AUTO)
    private Integer appointmentId;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "心理咨询师ID")
    private Integer counselorId;

    @Schema(description = "预约时间")
    private String appointmentTime;

    @Schema(description = "预约方式 (0: 面对面, 1: 视频咨询, 2: 电话咨询)")
    private Integer appointmentMethod;

    @Schema(description = "预约状态 (0: 待确认, 1: 已确认, 2: 已完成, 3: 已取消)")
    private Integer status;

    @Schema(description = "状态说明")
    private String statusDescription;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @Schema(description = "预约日期")
    private LocalDate appointmentDate;


    public static final Integer FACE_TO_FACE = 0;
    public static final Integer VIDEO_CONSULTATION = 1;
    public static final Integer PHONE_CONSULTATION = 2;


    public static final Integer TO_BE_CONFIRMED = 0;
    public static final Integer CONFIRMED = 1;
    public static final Integer COMPLETED = 2;
    public static final Integer CANCELLED = 3;



}
